package com.gourd.web.feign;

import com.gourd.common.data.BaseResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @author gourd
 */
@FeignClient(name = "gourd-service",fallback = RemoteHystrix.class)
@Component
public interface RemoteClient {

    /**
     * FeignClient测试Get请求
     *
     * @return
     */
    @GetMapping("gourd/gourd/testG")
    BaseResponse testServerG();

    /**
     * FeignClient测试Post接口
     *
     * @return
     */
    @PostMapping("gourd/gourd/testP")
    BaseResponse testServerP();

}